<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page  import="shcool.dao.*,java.sql.*,school.entity.*"  %>


<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'index.jsp' starting page</title>

<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script src="laydate/laydate.js"></script>
  </head>

<body>
	<h2>学生注册：</h2>
	<form action="doModifyReg.jsp" method="post">
		<p>
			<label>请输入姓名：</label><input type="text" name="stuname"
				placeholder="请输入姓名" />
		</p>
		<p>
			<label>请输入密码：</label><input type="password" name="pass"
				placeholder="请输入密码" />
		</p>
		<p>
			<label>性别是：</label> <input type="radio" name="sex" value="男" />男 <input
				type="radio" name="sex" value="女" />女
		</p>
		<p>
			<label>手机号码：</label><input type="text" name="tele"
				placeholder="请输入手机号码" />
		</p>

		<p>
			<label>QQ号：</label><input type="text" name="qq" placeholder="请输入QQ号" />
		</p>
		<p>
			<label>微信号：</label><input type="text" name="wechat"
				placeholder="请输入微信号" />
		</p>


		<p>
			<label>请选择年级编号：</label> 
			
			<select name="gradeId">
			
			<%
			MySqlStudentDaoImpl gr=new  MySqlStudentDaoImpl();
			
			List<Grade> data=gr.showGrade();
			for(Grade g:data){
				
				%>
					<option value="<%=g.getId()%>"><%=g.getGname()%></option>
				
				
				<%
			
				}
			%>
			
			
			</select>
		<p>
		
			
		 <label>入学日期：</label><input type="text" name="enterdate" onclick="laydate({format:'YYYY/MM/DD'})"/>

		</p>

		<p>
			<label>来自哪个城市：</label><input type="text" name="city"
				placeholder="请输入城市" />
		</p>

		<p>
			
	 <label>出生年月</label><input type="text" name="birthday" onclick="laydate({format:'YYYY/MM/DD'})"/>
		</p>

		<p>
			<label>地址：</label><input type="text" name="address"
				placeholder="请输入地址" />
		</p>

		<input type="submit" value="注册">
	</form>

</body>
</html>
